<template>
  <div class="custom-body" :style="borderStyle">
    <div class="body-custom" :style="bodyStyle">
      <div v-if="showHeader && temp.sfxsbt" class="custom-header">
        <div class="header-body">
          <div v-if="temp.sfsxtb === true" class="header-icon">
            <i :class="temp.tb" />
          </div>
          <div class="header-title">
            <span class="title-span">{{ temp.name }}</span>
          </div>
          <div
            v-if="temp.isMore === true"
            class="header-icon more"
            @click="callBack"
          >
            更多
          </div>
        </div>
      </div>
      <div class="custom-content">
        <el-empty
          v-if="dataList === null || dataList.length === 0"
          :image-size="100"
        />
        <div v-else>
          <div
            v-for="(obj, index) in dataList"
            :key="'obj-' + index"
            class="custom-ul-li"
            :loading="loading"
            @click="openEntity(obj)"
          >
            <div class="custom-ul-li-title">{{ obj[column["title"]] }}</div>
            <div class="custom-ul-li-button">
              <!-- 创建人 -->
              <div class="custom-li-button">{{ obj[column["left"]] }}</div>
              <!-- 后缀 -->
              <div class="custom-li-time">{{ obj[column["time"]] }}</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { mobile } from '@/mixins/mobile'

export default {
  name: 'AppNewListTempV1', // app学校新闻
  mixins: [mobile({ tabs: 'temp' })]
}
</script>

<style scoped>
.custom-body {
  width: 100%;
  height: 100%;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}
.body-custom {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-flow: column nowrap;
}
.custom-header {
  width: 100%;
  height: 50px;
  flex: 0 1 auto;
  padding: 0 10px;
  box-sizing: border-box;
  line-height: 50px;
  cursor: pointer;
}
.header-body {
  width: 100%;
  height: 51px;
  display: flex;
  flex-flow: row nowrap;
}
.header-icon {
  width: 20px;
  height: 50px;
  flex: 0 1 auto;
  text-align: center;
  color: #409eff;
  font-size: 1.1rem;
}
.header-icon.more {
  width: 50px;
  font-size: 0.9rem;
}
.header-title {
  height: 50px;
  flex: 1 1 auto;
  font-size: 0.9rem;
}
.title-span {
  height: 40px;
  padding: 12px 5px;
  box-sizing: border-box;
  line-height: 40px;
  text-align: center;
  position: relative;
  font-weight: bolder;
}
.custom-content {
  width: 100%;
  height: auto;
  flex: 1 1 auto;
  padding: 0 10px;
  overflow: hidden;
  box-sizing: border-box;
}
.custom-ul-li {
  width: 100%;
  height: 60px;
  display: flex;
  flex-flow: column nowrap;
  cursor: pointer;
  font-size: 0.9rem;
}
.custom-ul-li:not(:last-child) {
  border-bottom: 1px solid #ebeef5;
}
.custom-ul-li-title {
  flex: 0 1 auto;
  height: 40px;
  line-height: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-ul-li-button {
  flex: 0 1 auto;
  height: 20px;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  color: #909399;
}
.custom-li-button,.custom-li-time {
  height: 20px;
  line-height: 20px;
  font-size: 0.8rem;
}
[class*="el-col-"] {
  float: left;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
</style>
